#include <iostream>
#include <cmath>
#include <algorithm>
using namespace std;

int a, b, c, ans[100], len;
const int maxn = 1000000000;

long long cal(int x)
{
	long long t = 1;
	for (int i = 0; i != a; ++i) t *= x;
	return t;
}

bool judge(long long x, int y)
{
	if (x <= 0 || x >= maxn) return false;
	int s = 0;
	while (x) {
		s += x%10;
		x /= 10;
	}
	if (s == y) return true;
	return false;
}

int main()
{
	cin >> a >> b >> c;
	for (int i = 1; i <= 81; ++i) {
		long long x = b * cal(i) + c;
		if (judge(x, i)) ans[len++] = x;
	}
	sort(ans, ans+len);
	cout << len << endl;
	for (int i = 0; i != len; ++i)
		cout << ans[i] << ' ';
	cout << endl;
}
